package net.huashitong.Indicators.service;

import com.sirdc.modules.core.dao.BaseDao;
import com.sirdc.modules.sys.base.StringPKService;
import com.sirdc.modules.sys.service.SysTableService;
import net.huashitong.Indicators.dao.FeedBackDao;
import net.huashitong.Indicators.entity.FeedBack;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FeedBackService extends StringPKService<FeedBack> {
    @Autowired
    private FeedBackDao feedBackDao;
    @Autowired
    private SysTableService tableService;
    @Override
    protected BaseDao<FeedBack, String> getDao() {
        return feedBackDao;
    }
    @Override
    protected void beforeSave(FeedBack obj) {
        obj.setSysId(tableService.updateMaxSysId("CA02", null));
    }
}
